package com.yjzx.util.common.util.exception;

import java.util.Objects;

/**
 * @author guozhi
 * @date 2024/9/6
 * @description ConsumerThrow
 */
@FunctionalInterface
public interface ConsumerThrow<T,E extends Throwable> {
    void accept(T t) throws E;
    default ConsumerThrow<T,E> andThen(ConsumerThrow<? super T,E> after) {
        Objects.requireNonNull(after);
        return (T t) -> { accept(t); after.accept(t); };
    }
}
